package com.example.applicationview

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch

class KotlinActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_kotlin)
        println("协程执行kaishi")
        val job = GlobalScope.launch {
            delay(1000)
            println("协程执行结束 -- 线程id：${Thread.currentThread().id}")
        }

    }
}
